What type of listener is needed for an ActionEvent?

Answer:

An object which implements ActionListener.

Repeat after Me

Here an application that has two JTextFields. The user types into one field and hits enter. The application then copies the text from that field to the other.

GUI of the application

In the picture, the user typed in "Sherlock" and then hit enter. Here is an applet that does much the same thing. Swing components work in applets as well as applications.

The applet is "live" so you can type your name in the first box and see it echoed to the second. The code for the applet is nearly the same as the code for the application. Applets will be discussed in greater detail later.

QUESTION 9: